home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / HyperCard Related / APDA HyperCard Toolkits / HyperCard Video Toolkit 2.0 / HVT #2 / Advanced Material / Video Sources / videoStatus.p < prev    next >
Encoding:
Text File  |  1995-02-07  |  1.6 KB  |  71 lines  |  [TEXT/MPS ]

  1. (*
  2.     videoStatus() -- Return the status of the player as a comma-separated list containing:
  3.                                     CLV or CAV - type of disc
  4.                                     doorOpen or park or still or play - state of player
  5.                                     disc12inch or disc8inch - size of disc being played
  6.                                     side1 or side2 - side of disc being played
  7.                             or noAnswer if the player did not answer
  8.                             or notImplemented if the player answered but cannot return any of the info.
  9.  
  10.     To compile and link this file using Macintosh Programmer's Workshop,
  11.  
  12.         pascal -w videoStatus.p
  13.  
  14.         link -m ENTRYPOINT -o HyperCommands -rt XFCN=8008 -sn Main=videoStatus ∂
  15.             videoStatus.p.o "{MPW}"Libraries:interface.o "{MPW}"PLibraries:PasLib.o
  16.  
  17.     Copyright © 1988 Apple Computer, Inc.
  18.  
  19.     2/88 - Initial coding by Harry R. Chesley.
  20. *)
  21.  
  22. {$R-}
  23.  
  24. {$S videoStatus }     { Segment name must be the same as the command name. }
  25.  
  26. unit DummyUnit;
  27.  
  28. interface
  29.  
  30. uses MemTypes, QuickDraw, OSIntf, ToolIntf, HyperXCmd;
  31.  
  32. procedure EntryPoint(paramPtr: XCmdPtr);
  33.     
  34. implementation
  35.  
  36. type
  37.  
  38. Str31 = String[31];
  39.  
  40. procedure videoStatus(paramPtr: XCmdPtr); forward;
  41.  
  42. procedure EntryPoint(paramPtr: XCmdPtr);
  43.  
  44.     begin
  45.         videoStatus(paramPtr);
  46.     end;
  47.  
  48. procedure videoStatus(paramPtr: XCmdPtr);
  49.  
  50.     {$I XCmdGlue.inc}
  51.  
  52.     procedure Fail(errMsg: Str255); { set theResult and quit }
  53.         begin
  54.             paramPtr^.returnValue := PasToZero(errMsg);
  55.             exit(videoStatus);
  56.         end;
  57.  
  58.     {$I VideoUtil.inc}
  59.  
  60.     begin
  61.         if paramPtr^.paramCount <> 0 then Fail('parameter count is not 0');
  62.  
  63.         { Clear out any pending input. }
  64.         EvalAndDispose('recvUpTo(empty,0,empty)');
  65.  
  66.         { Return the current player status. }
  67.         paramPtr^.returnValue := PasToZero(videoFunc('status',''))
  68.     end;
  69.  
  70. end.
  71.